/**
 * <pre>
 * Copyright 2008 Antonio Jacob Costa (jacob.costa@gmail.com)
 * 
 * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at 
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an &quot;AS IS&quot; BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 * </pre>
 */
package org.ajc.maximo4eclipse.templates;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

/**
 * <p>
 * Generates the code for the Mbo class.
 * </p>
 * TODO For now the code is hardcoded, the goal is to put it in template files.
 * 
 * @author Antonio Jacob Costa
 */
public class Fld {
  /**
   * <p>
   * 
   * </p>
   */
  public static InputStream openContentStream(String fldName,
      String packageName, String superclassName) {
    String contents = "/**\n" 
      + " *\n" 
      + " */\n" 
      + "package " + packageName+ ";\n" 
      + "\n"
      + "import psdi.mbo.MboValue;\n" 
      + "import psdi.mbo.MboValueAdapter;\n"
      + "\n" 
      + "/**\n"
      + " * Fld class.\n" 
      + " *\n" 
      + " * <p>\n"
      + " *   Class generated using maximo4eclipse\n"
      + " *   (http://code.google.com/p/maximo4eclipse/)\n" 
      + " * </p>\n"
      + " *\n" 
      + " */\n" 
      + "public class " + fldName + " extends " + superclassName + " {\n" 
      + "  /**\n"
      + "   * @param  mboSet <p>Parent MboSet.</p>\n"
      + "   * @throws RemoteException\n" + "   */\n" 
      + "  public " + fldName + "(MboValue mboV) {\n" 
      + "    super(mboV);\n"
      + "  }\n" 
      + "}\n";
    return new ByteArrayInputStream(contents.getBytes());
  }
}
